Integrand size = 23, antiderivative size = 52 \[ \int \frac {\cot ^2(c+d x)}{a+b \sin ^2(c+d x)} \, dx=-\frac {\sqrt {a+b} \arctan \left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{a^{3/2} d}-\frac {\cot (c+d x)}{a d} \]
[Out]
Time = 0.12 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3274, 331, 211} \[ \int \frac {\cot ^2(c+d x)}{a+b \sin ^2(c+d x)} \, dx=-\frac {\sqrt {a+b} \arctan \left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{a^{3/2} d}-\frac {\cot (c+d x)}{a d} \]
[In]
[Out]
Rule 211
Rule 331
Rule 3274
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {1}{x^2 \left (a+(a+b) x^2\right )} \, dx,x,\tan (c+d x)\right )}{d} \\ & = -\frac {\cot (c+d x)}{a d}-\frac {(a+b) \text {Subst}\left (\int \frac {1}{a+(a+b) x^2} \, dx,x,\tan (c+d x)\right )}{a d} \\ & = -\frac {\sqrt {a+b} \arctan \left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{a^{3/2} d}-\frac {\cot (c+d x)}{a d} \\ \end{align*}
Time = 0.52 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.00 \[ \int \frac {\cot ^2(c+d x)}{a+b \sin ^2(c+d x)} \, dx=\frac {-\sqrt {a+b} \arctan \left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )-\sqrt {a} \cot (c+d x)}{a^{3/2} d} \]
[In]
[Out]
Time = 1.49 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.06
method | result | size |
derivativedivides | \(\frac {-\frac {1}{a \tan \left (d x +c \right )}+\frac {\left (-a -b \right ) \arctan \left (\frac {\left (a +b \right ) \tan \left (d x +c \right )}{\sqrt {a \left (a +b \right )}}\right )}{a \sqrt {a \left (a +b \right )}}}{d}\) | \(55\) |
default | \(\frac {-\frac {1}{a \tan \left (d x +c \right )}+\frac {\left (-a -b \right ) \arctan \left (\frac {\left (a +b \right ) \tan \left (d x +c \right )}{\sqrt {a \left (a +b \right )}}\right )}{a \sqrt {a \left (a +b \right )}}}{d}\) | \(55\) |
risch | \(-\frac {2 i}{a d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}-\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \sqrt {-a \left (a +b \right )}-2 a -b}{b}\right )}{2 a^{2} d}+\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \sqrt {-a \left (a +b \right )}+2 a +b}{b}\right )}{2 a^{2} d}\) | \(121\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 95 vs. \(2 (44) = 88\).
Time = 0.31 (sec) , antiderivative size = 290, normalized size of antiderivative = 5.58 \[ \int \frac {\cot ^2(c+d x)}{a+b \sin ^2(c+d x)} \, dx=\left [\frac {\sqrt {-\frac {a + b}{a}} \log \left (\frac {{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (4 \, a^{2} + 5 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{2} + 4 \, {\left ({\left (2 \, a^{2} + a b\right )} \cos \left (d x + c\right )^{3} - {\left (a^{2} + a b\right )} \cos \left (d x + c\right )\right )} \sqrt {-\frac {a + b}{a}} \sin \left (d x + c\right ) + a^{2} + 2 \, a b + b^{2}}{b^{2} \cos \left (d x + c\right )^{4} - 2 \, {\left (a b + b^{2}\right )} \cos \left (d x + c\right )^{2} + a^{2} + 2 \, a b + b^{2}}\right ) \sin \left (d x + c\right ) - 4 \, \cos \left (d x + c\right )}{4 \, a d \sin \left (d x + c\right )}, \frac {\sqrt {\frac {a + b}{a}} \arctan \left (\frac {{\left ({\left (2 \, a + b\right )} \cos \left (d x + c\right )^{2} - a - b\right )} \sqrt {\frac {a + b}{a}}}{2 \, {\left (a + b\right )} \cos \left (d x + c\right ) \sin \left (d x + c\right )}\right ) \sin \left (d x + c\right ) - 2 \, \cos \left (d x + c\right )}{2 \, a d \sin \left (d x + c\right )}\right ] \]
[In]
[Out]
\[ \int \frac {\cot ^2(c+d x)}{a+b \sin ^2(c+d x)} \, dx=\int \frac {\cot ^{2}{\left (c + d x \right )}}{a + b \sin ^{2}{\left (c + d x \right )}}\, dx \]
[In]
[Out]
none
Time = 0.35 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.96 \[ \int \frac {\cot ^2(c+d x)}{a+b \sin ^2(c+d x)} \, dx=-\frac {\frac {{\left (a + b\right )} \arctan \left (\frac {{\left (a + b\right )} \tan \left (d x + c\right )}{\sqrt {{\left (a + b\right )} a}}\right )}{\sqrt {{\left (a + b\right )} a} a} + \frac {1}{a \tan \left (d x + c\right )}}{d} \]
[In]
[Out]
none
Time = 0.47 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.63 \[ \int \frac {\cot ^2(c+d x)}{a+b \sin ^2(c+d x)} \, dx=-\frac {\frac {{\left (\pi \left \lfloor \frac {d x + c}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a + 2 \, b\right ) + \arctan \left (\frac {a \tan \left (d x + c\right ) + b \tan \left (d x + c\right )}{\sqrt {a^{2} + a b}}\right )\right )} {\left (a + b\right )}}{\sqrt {a^{2} + a b} a} + \frac {1}{a \tan \left (d x + c\right )}}{d} \]
[In]
[Out]
Time = 14.54 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.85 \[ \int \frac {\cot ^2(c+d x)}{a+b \sin ^2(c+d x)} \, dx=-\frac {\mathrm {cot}\left (c+d\,x\right )}{a\,d}-\frac {\mathrm {atan}\left (\frac {\mathrm {tan}\left (c+d\,x\right )\,\sqrt {a+b}}{\sqrt {a}}\right )\,\sqrt {a+b}}{a^{3/2}\,d} \]
[In]
[Out]